﻿namespace In66.Net.Share.Middleware
{
    /// <summary>
    /// 中间件
    /// </summary>
    public static class MiddlewareHelpers
    {
        /// <summary>
        /// 异常处理中间件
        /// </summary>
        /// <param name="app"></param>
        /// <returns></returns>
        public static IApplicationBuilder UseCustomException(this IApplicationBuilder builder)
        {
            return builder.UseMiddleware<GlobalExceptionMidd>();
        }

        ///// <summary>
        ///// 请求响应中间件
        ///// </summary>
        ///// <param name="app"></param>
        ///// <returns></returns>
        //public static IApplicationBuilder UseRequestResponseLog(this IApplicationBuilder app)
        //{
        //    return app.UseMiddleware<RequRespLogMildd>();
        //}

        ///// <summary>
        ///// IP请求中间件
        ///// </summary>
        ///// <param name="app"></param>
        ///// <returns></returns>
        //public static IApplicationBuilder UseIpLogMildd(this IApplicationBuilder app)
        //{
        //    return app.UseMiddleware<IPLogMildd>();
        //}
    }
}
